package audit

import (
	"counter-help/admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type UserIdentityRouter struct{}

// InitUserIdentityRouter 初始化 UserIdentity 路由
func (r *UserIdentityRouter) InitUserIdentityRouter(Router *gin.RouterGroup) {
	userIdentityRouter := Router.Group("identity").Use(middleware.OperationRecord())
	{
		userIdentityRouter.POST("create", UserIdentityApi.CreateOrUpdateIdentity)    // 创建身份认证
		userIdentityRouter.PUT("updateIdentity", UserIdentityApi.UpdateIdentity)     // 更新身份认证信息
		userIdentityRouter.GET("get", UserIdentityApi.GetIdentity)                   // 获取用户的身份认证信息
		userIdentityRouter.DELETE("deleteIdentity", UserIdentityApi.DeleteIdentity)  // 删除身份认证信息
		userIdentityRouter.PUT("approve", UserIdentityApi.ApproveIdentity)           // 审核通过
		userIdentityRouter.PUT("reject", UserIdentityApi.RejectIdentity)             // 审核不通过
		userIdentityRouter.GET("getPending", UserIdentityApi.GetPendingIdentities)   // 获取所有未审核身份认证记录
		userIdentityRouter.GET("getApproved", UserIdentityApi.GetApprovedIdentities) // 获取所有已审核身份认证记录
	}
}
